import { FC } from 'react';
import { Card, Button, Space, message, } from 'antd';
const index: FC = () => {
  const success = () => {
    message.success('This is a success message');
  };

  const error = () => {
    message.error('This is an error message');
  };

  const warning = () => {
    message.warning('This is a warning message');
  };

  return (
    <Space direction="vertical" style={{ width: "100%" }}>
      <Card title="Message全局提示" bordered={false} style={{ width: "100%" }}>
        <Space>
          <Button onClick={success}>Success</Button>
          <Button onClick={error}>Error</Button>
          <Button onClick={warning}>Warning</Button>
        </Space>
      </Card>
    </Space>
  );
}

export default index;